package com.migo.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.migo.mapper.ItemParamExdMapper;
import com.migo.pojo.EasyUIDataGridResult;
import com.migo.pojo.ItemParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/6/11 0011.
 */
@Service
public class ItemParamService extends BaseService<ItemParam> {
    @Autowired
    private ItemParamExdMapper itemParamExdMapper;

    public EasyUIDataGridResult getItemParamList(int page,int rows){
        PageHelper.startPage(page, rows);
        List list = itemParamExdMapper.selectList();
        PageInfo pageInfo = new PageInfo(list);
        EasyUIDataGridResult result = new EasyUIDataGridResult();
        result.setTotal(pageInfo.getTotal());
        result.setRows(pageInfo.getList());
        return result;
    }
}
